#pragma once


#include <memory>
#include <string>
#include <unordered_map>
#include <vector>

#include <croutine/croutine.h>
#include <scheduler/scheduler.h>
#include <config/classic_conf.h>


class SchedulerClassic : public Scheduler {

public:
    bool RemoveCRoutine(uint64_t crid) override;
    bool RemoveTask(const std::string& name) override;
    bool DispatchTask(const std::shared_ptr<CRoutine>&) override;
private:
    friend Scheduler* Scheduler_Instance();
    SchedulerClassic();
    void CreateProcessor();
    bool NotifyProcessor(uint64_t crid) override;
    std::unordered_map<std::string, ClassicTask> cr_confs_;

    ClassicConf classic_conf_;
};

